package com.hill;

public class ArrayOfPrimitive {
    public static void main(String[] args) {
        int[] a1={1,2,3,4,5};
        int[] a2;
        a2=a1;
        for (int i =0;i<a2.length;i++)
            a2[i]=a2[i]+1;
         for(int i=0;i<a1.length;i++){
             System.out.println("a["+i+"]="+a1[i]);
         }
        int oldSum =0;
        int evenSum =0;
        for (int i=0;i<100;i++){
            if(i%2!=0){
                oldSum +=i;
             }else {
                evenSum +=i;
            }
        }
        System.out.println("奇数和为："+ oldSum);
        System.out.println("偶数和为："+ evenSum);

    }
}
